<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="spring" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<body>
<div id="content">
    <div class="span10">
        <form:form modelAttribute="contract" method="POST" cssClass="form-horizontal">

            <div class="control-group"><label class="control-label">Product:</label><form:select path="idProduct" items="${products}" itemLabel="name_product" itemValue="id_product"/></div>
            <div class="control-group"><label class="control-label">Start date(YYYY-MM-DD):</label><form:input path="startDate"/></div>
            <form:errors path="startDate" cssClass="type.Mismatch.java.util.Date"/>
            <div class="control-group"><label class="control-label">Max borrow:</label><form:input path="maxBorrow"/></div>
            <form:errors path="maxBorrow" cssClass="outOfRange" />
            <div class="control-group"><label class="control-label">Status:</label>
                <form:radiobutton path="status" value="1"/>Active
                <form:radiobutton path="status" value="0"/>Inactive
            </div>
            <%--<form:errors path="lname" cssClass="error"/>--%>
            <div class="control-group"><input type="reset" value="Reset"/><input type="submit" value="Save"/></div>

        </form:form>
    </div>
</div>
</body>
</html>